package com.zto.tbschedule.console.vo;


import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;

public class User implements Serializable {
    private Long id;
    @Pattern(regexp = "[a-zA-Z]{6,12}", message = "用户名必须是6到12位的字母和数字")
    private String username;
    @Pattern(regexp = "[a-zA-Z]{6,20}", message = "密码必须是6到20位的字母和数字")
    private String password;

    private String confirPassword;

    private String newPassword;
    @Pattern(regexp = "[管理员|普通员工]", message = "角色必须是管理员或者普通员工")
    private String role;
    @Pattern(regexp = "[启用|禁用]", message = "状态必须是启用或者禁用")
    private String enable;
    @NotEmpty(message = "姓名长度必须是2到12")
    private String nickName;

    private Date createDate;

    private Date modifyDate;

    private String modifyNickName;

    private Integer appCount;

    public Integer getAppCount() {
        return appCount;
    }

    public void setAppCount(Integer appCount) {
        this.appCount = appCount;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username == null ? null : username.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getConfirPassword() {
        return confirPassword;
    }

    public void setConfirPassword(String confirPassword) {
        this.confirPassword = confirPassword;
    }

    public String getNewPassword() {
        return newPassword;
    }

    public void setNewPassword(String newPassword) {
        this.newPassword = newPassword;
    }

    public String getEnable() {
        return enable;
    }

    public void setEnable(String enable) {
        this.enable = enable;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    public String getModifyNickName() {
        return modifyNickName;
    }

    public void setModifyNickName(String modifyNickName) {
        this.modifyNickName = modifyNickName;
    }
}
